package smetana.domain.raw;

import java.sql.Date;
import java.math.BigDecimal;
import com.google.common.base.Preconditions;
import smetana.domain.AbstractEntity;

import static org.apache.commons.lang.StringUtils.defaultString;

public class DocPosition  extends AbstractEntity {
    private int id;
    private Date dateStart;
    private Date dateEnd;
    private int docId;
    private Integer orderNum;
    private Integer positionId;
    private BigDecimal amount;
    private BigDecimal realPrice;

    protected DocPosition(){
        //used by iBatis.
    }

    public DocPosition(int id){
        this.id = id;
    }

    @Override
    public int getId(){
        return this.id;
    }

    public void setId(int id){
        this.id = id;
    }
    public Date getDateStart(){
        return this.dateStart;
    }

    public void setDateStart(Date dateStart){
        this.dateStart = Preconditions.checkNotNull(dateStart);
    }
    public Date getDateEnd(){
        return this.dateEnd;
    }

    public void setDateEnd(Date dateEnd){
        this.dateEnd = Preconditions.checkNotNull(dateEnd);
    }
    public int getDocId(){
        return this.docId;
    }

    public void setDocId(int docId){
        this.docId = docId;
    }
    public Integer getOrderNum(){
        return this.orderNum;
    }

    public void setOrderNum(Integer orderNum){
        this.orderNum = orderNum;
    }
    public Integer getPositionId(){
        return this.positionId;
    }

    public void setPositionId(Integer positionId){
        this.positionId = positionId;
    }
    public BigDecimal getAmount(){
        return this.amount;
    }

    public void setAmount(BigDecimal amount){
        this.amount = amount;
    }
    public BigDecimal getRealPrice(){
        return this.realPrice;
    }

    public void setRealPrice(BigDecimal realPrice){
        this.realPrice = Preconditions.checkNotNull(realPrice);
    }
}